import { Http } from "./http.js";
import { config } from "./config.js";

export const api = {
  dayprice(data){
    return Http.request({
      method: "post",
      url: "/api/index/dayprice",
      data: data,
    });
  },
  getOrders(data){
    return Http.request({
      method: "post",
      url: "/api/orders/getOrders",
      data: data,
    });
  },
  upstatus(data){
    return Http.request({
      method: "post",
      url: "/api/orders/upstatus",
      data: data,
    });
  },
  orderDetail(data){
    return Http.request({
      method: "post",
      url: "/api/orders/orderDetail",
      data: data,
    });
  },
  myorder(data){
    return Http.request({
      method: "post",
      url: "/api/Orders/myorder",
      data: data,
    });
  },
  towcate(data){
    return Http.request({
      method: "post",
      url: "/api/ajax/towcate",
      data: data,
    });
  },
  orderlist(data){
    return Http.request({
      method: "post",
      url: "/api/orders/index",
      data: data,
    });
  },
  oncharge(data){
    return Http.request({
      method: "post",
      url: "/api/orders/oncharge",
      data: data,
    });
  },
  cxorder(data){
    return Http.request({
      method: "post",
      url: "/api/orders/cxorder",
      data: data,
    });
  },
  index(data){
    return Http.request({
      method: "post",
      url: "/api/index/index",
      data: data,
    });
  },
  login(data){
    return Http.request({
      method: "post",
      url: "/api/user/checkIn",
      data: data,
    });
  },
  register(data){
    return Http.request({
      method: "post",
      url: "/api/user/checkIn",
      data: data,
    });
  },
  businessIndex(params){
    return Http.request({
      method: "post",
      url: "/api/index/query_business",
      data: params,
    });
  },
  businessRow(params){
    return Http.request({
      method: "post",
      url: "/api/index/business",
      data: params,
    });
  },
  changePassword(data){
    return Http.request({
      method: "post",
      url: "/api/account/changePassword",
      data: data,
    });
  },
  userinfo(data){
    return Http.request({
      method: "get",
      url: "/api/account/profile",
      data: data,
    });
  },
  upuserinfo(data){
    return Http.request({
      method: "POST",
      url: "/api/account/profile",
      data: data,
    });
  },
  getPageinfo(data){
    return Http.request({
      method: "POST",
      url: "/api/index/pageinfo",
      data: data,
    });
  },
  getappfuns(data){
    return Http.request({
      method: "POST",
      url: "/api/index/appfuns",
      data: data,
    });
  },
  submitPay(data){
    return Http.request({
      method: "POST",
      url: "/api/index/submitPay",
      data: data,
    });
  },
  chargePrices(data){
    return Http.request({
      method: "post",
      url: "/api/index/chargePrices",
      data: data,
    });
  },
  sumitCharge(data){
    return Http.request({
      method: "post",
      url: "/api/index/sumitCharge",
      data: data,
    });
  }
}
